import { cardCache, toast } from 'nc-lightapp-front';
import config from '../config';
const { setDefData } = cardCache;
export default function (props, moduleId, key, value, changedrows, index, record) {
    if (key !== 'qry_objdatatype') return;
    if (!value.value && !value.display) {
        props.editTable.setValByKeyAndIndex(moduleId, index, 'dsp_objname', { value: '' });
        props.editTable.setValByKeyAndIndex(moduleId, index, 'bd_refname', { value: '' });
        props.editTable.setValByKeyAndIndex(moduleId, index, 'bd_mdid', { value: '' });
        return;
    }
    props.editTable.setValByKeyAndIndex(moduleId, index, 'dsp_objname', { value: value.refname });
    props.editTable.setValByKeyAndIndex(moduleId, index, 'bd_refname', { value: value.values.typeName });
    props.editTable.setValByKeyAndIndex(moduleId, index, 'bd_mdid', { value: value.values.typeId });
}
